--- title: Signal To Noise Ratio for the OpenHSI Camera keywords: fastai sidebar: home_sidebar summary: "Includes an interactive SNR calculator." description: "Includes an interactive SNR calculator." nb_path: "nbs/04_snr.ipynb" ---
{% include tip.html content='This module can be imported using from openhsi.snr import *' %}
This module contains a 6SV1.1 Atmospheric Correction class that computes the pixel radiance given some parameters and a servable interactive SNR widget. 6SV is an open souce radiative transfer code that predicts the solar spectrum received by a sensor facing the Earth. Since it is written in Fortran, we use a Python wrapper called Py6S to expose the functionality and that means we are limited to using 6SV1.1 rather than the newer 6SV2.1.
The F number of an optical system is a measure of overall light throughput (the ability to produce contrast at a given resolution) and is given by
{% raw %}
$$ F/\# = \frac{f}{ \varnothing _{\text{EA}}} $$
{% endraw %}
where $f$ is the focal length and $\varnothing _{\text{EA}}$ is the effective aperture diameter.
Assuming the dominant source of noise is photon shot noise $\sigma_s=\sqrt{S}$, the SNR is given by {% raw %} $$ \text{SNR} \approx S/\sigma_s = \sqrt{S}$$ {% endraw %} where the signal $$S= \eta_{QE} N\Delta t$$ with $\eta_{QE,\lambda}$ the quantum efficiency, $N$ the photons per second and $\Delta t$ the exposure time.
The number of photons per second is given by the formula $$ N_\lambda = L_\lambda \rho_\lambda \eta_{opt} \eta_G \eta_{QE} A_d \Delta\lambda \frac{\lambda}{hc} \frac{\pi}{4(F/\#)^2} $$ where $L_\lambda$ is the solar radiance at Earth's surface given the geolocation and UTC time, $\rho_\lambda$ is the surface reflectance, $\eta_{opt}$ is the optical efficiency, $\eta_G$ is the grating efficiency, $\eta_{QE}$ is the quantum efficiency of the sensor, $A_d$ is the detector area, $\Delta \lambda$ is the FWHM or bandwidth, and $\lambda$ is wavelength.
%time ref_model = Model6SV(wavelength_array = np.linspace(390,820,num=100),sixs_path="../../Downloads/6SV1.1/sixsV1.1")
ref_model.show()
widget = Widget_SNR(ref_model=ref_model,name="Interactive SNR Widget")
pn.Row(widget.param,widget.view)